<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>1</cardCount>
<cardID>3691</cardID>
<listID>4276</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>-- XFCN EditString v1.3 by M S Wall of Green Moutain Softwareon openStack --Stack last modified: 8/4/92hypercardVersionlock screenshow menuBardomenu "Hide Others"hide titleBarglobal next_field_nameput "letter1" into next_field_nameif field myPuzzle ≠ empty and field cryptoPuzzle ≠ empty thenglobal keyMemory,thePuzzleSolved,myPuzzleMemory,¬cryptoPuzzleMemory,puzzleMemoryput field "key" into keyMemoryput line 3 to (the number of lines of field record) of field record¬into thePuzzleSolvedput field myPuzzle into myPuzzleMemoryput field cryptoPuzzle into cryptoPuzzleMemoryput field puzzle into puzzleMemoryelseglobal myPuzzleMemory,cryptoPuzzleMemory,puzzleMemoryput empty into myPuzzleMEMORYput empty into cryptoPuzzleMEMORYput empty into puzzleMEMORYend ifput "Tools,Font,Style" into menuListrepeat with m = 1 to the number of items of menuListif there is a menu (item m of menuList) then delete menu (item m of menuList)end repeatcreateCryptogramMenuif charToNum of char 2 of field pressAlphabet = 65 then -- FIND OUT IF PUZZLE IS ALL CAPSset checkMark of menuitem "Difficult Puzzle" of menu "Cryptogram" to trueend ifdisable menuitem "Difficult Puzzle" of menu "Cryptogram"global alphabetMemoryif alphabetMemory = empty thenput "a b c d e f g h i j k l m n o p q r s t u v w x y z" ¬into alphabetMemoryend ifif the checkMark of menuItem "Difficult Puzzle" of menu "Cryptogram" ¬= true thenput editString("ucase",alphabetMemory) into alphabetMemoryend ifif the userLevel = 1 thenglobal originalUserLevelTempput the userLevel into originalUserLevelTempset userLevel to 2put emptytype "The user level has temporarily been set to 2."end ifunlock screenend openStackon closeStack -- 7/8/92put empty into field "letter1"put empty into field "letter2"get the freeSize of this stackif it >= (the Size of this stack * .25) then compactThisStackglobal originalUserLevelTempif originalUserLevelTemp = 1 thenset userLevel to 1put emptytype "The user level has been reset to 1."end ifreset menuBarshow titleBarend closeStackon hypercardVersionif the version < 2.1 thenanswer "This stack requires HyperCard version 2.1. or higher!"go homeexit to HyperCardend ifend hypercardVersionon compactThisStackput the userLevel into userLevelTempset the userLevel to 5-- put "Compacting the stack…please wait!"put emptytype "Compacting the stack…please wait!"doMenu "Compact Stack"set the userLevel to userLevelTemphide msgend compactThisStackon solveItForMelock screenset the enabled of menuItem "Difficult Puzzle" of menu "Cryptogram" to trueput "solution given" into line 2 of field "record"put line 3 to (the number of lines of field record) of field record ¬into field myPuzzleunlock screen with dissolve very fastend solveItForMe-- MENU MESSAGES CREATED 6-2-92-- ** -- ** -- **on createCryptogramMenuif there is a menu "Cryptogram" then exit createCryptogramMenucreate menu "Cryptogram"put createCryptogramMenuItems() into menu "Cryptogram" with menuMsg createCryptogramMenuMsgs()set checkMark of menuItem 7 of menu "Cryptogram" to truedisable menuItem 2 of menu "Cryptogram"end createCryptogramMenufunction createCryptogramMenuItemsreturn "Change Puzzle Format" & return & ¬"-" & return & ¬"Difficult Puzzle" & return & ¬"Restart Puzzle" & return & ¬"Solve Puzzle" & return & ¬"-" & return & ¬"Sound" & returnend createCryptogramMenuItemsfunction createCryptogramMenuMsgsreturn "changePuzzleFormat" & return & ¬"" & return & ¬"toggleDifficulty" & return & ¬"restartPuzzle" & return & ¬"solvePuzzle" & return & ¬"" & return & ¬"toggleSound"end createCryptogramMenuMsgs-- ** -- ** -- **on changePuzzleFormatlock screenif the textFont of field myPuzzle = "Helvetica" then-- OVERLAPPING FIELDSset the rect of field myPuzzle to 20,77,494,224set the rect of field cryptoPuzzle to 21,92,493,238set wideMargins of field myPuzzle to trueset wideMargins of field cryptoPuzzle to trueset the textFont of field myPuzzle to Monacoset the textFont of field cryptoPuzzle to Monacoset the textSize of field myPuzzle to 12set the textSize of field cryptoPuzzle to 12set the textHeight of field myPuzzle to 36set the textHeight of field cryptoPuzzle to 36set the textStyle of field myPuzzle to extendset the textStyle of field cryptoPuzzle to extendset the textAlign of field myPuzzle to centerset the textAlign of field cryptoPuzzle to center--set textFont of field alphabet to Monacoset textFont of field pressAlphabet to Monacoset textSize of field alphabet to 14set textSize of field pressAlphabet to 14set textFont of field letter1 to Monacoset textFont of field letter2 to Monacoset textSize of field letter1 to 14set textSize of field letter2 to 14else-- SEPARATE FIELDSset the rect of field myPuzzle to 25,92,490,171set the rect of field cryptoPuzzle to 25,170,490,249set the textFont of field myPuzzle to Helveticaset the textFont of field cryptoPuzzle to Helveticaset the textSize of field myPuzzle to 18set the textSize of field cryptoPuzzle to 18set the textHeight of field myPuzzle to 13set the textHeight of field cryptoPuzzle to 13set the textStyle of field myPuzzle to plainset the textStyle of field cryptoPuzzle to plainset the textAlign of field myPuzzle to centerset the textAlign of field cryptoPuzzle to center--set textFont of field alphabet to Helveticaset textFont of field pressAlphabet to Helveticaset textSize of field alphabet to 18set textSize of field pressAlphabet to 18set textFont of field letter1 to Helveticaset textFont of field letter2 to Helveticaset textSize of field letter1 to 18set textSize of field letter2 to 18end ifif charToNum of char 3 of field pressAlphabet = 65 and ¬textFont of field alphabet = "Helvetica" thenset textStyle of field alphabet to plainset textStyle of field pressAlphabet to plainelse if charToNum of char 3 of field pressAlphabet = 97 and ¬textFont of field alphabet = "Helvetica" thenset textStyle of field alphabet to extendset textStyle of field pressAlphabet to extendelse if charToNum of char 3 of field pressAlphabet = 65 and ¬textFont of field alphabet = "Monaco" thenset textStyle of field alphabet to plainset textStyle of field pressAlphabet to plainelse if charToNum of char 3 of field pressAlphabet = 97 and ¬textFont of field alphabet = "Monaco" thenset textStyle of field alphabet to plainset textStyle of field pressAlphabet to plainend ifunlock Screen with dissolve very fastend changePuzzleFormaton toggleDifficultyset checkMark of menuItem "Difficult Puzzle" of menu "Cryptogram" to ¬not checkMark of menuItem "Difficult Puzzle" of menu "Cryptogram"end toggleDifficultyon restartPuzzlelock Screenglobal keyMemory,myPuzzleMemoryput keyMemory into field "key"put myPuzzleMemory into field myPuzzletoggleDifficultPuzzleif line 2 of field "record" = "solution given" thenput 0 into line 1 of field recordend ifput empty into field "letter1"put empty into field "letter2"global next_field_nameput "letter1" into next_field_nameunlock Screen with dissolve very fastend restartPuzzleon solvePuzzleanswer "Please choose one…" with "Cancel" or "My Guess" or "Tell me!"if it = "" then exit solvePuzzleif it = "Tell me!" thensolveItForMeend ifif it = "My Guess" thenlock Screenset the rect of cd field myguess to 18,224,496,325put "The puzzle is:" & return into cd field myGuesshide field cryptoPuzzleShow cd field myGuessshow btn "Okay"show btn "Cancel"unlock Screen with dissolve very fastselect after text of cd field myGuessend ifend solvePuzzleon toggleSoundset the checkMark of menuItem "Sound" of menu "Cryptogram" to ¬not the checkMark of menuItem "Sound" of menu "Cryptogram"end toggleSoundon renumberSayingsput field sayings into temp1set the numberFormat to "000"set itemDelimiter to tabrepeat with x = 1 to the number of lines of temp1put "#" & x into item 1 of line x of temp1end repeatput temp1 into field sayingsend renumberSayingson toggleDifficultPuzzle-- lock screen-- CHANGE FIELD ALPHABETset the rect of field Alphabet to 24,50,491,72put "a b c d e f g h i j k l m n o p q r s t u v w x y z" ¬into field Alphabetif the checkMark of menuItem "Difficult Puzzle" of menu "Cryptogram" ¬= true thenput editString("ucase",field alphabet) into field Alphabetend if-- CHANGE FIELD PRESSALPHABETset the rect of field pressAlphabet to 21,266,495,287put " a b c d e f g h i j k l m n o p q r s t u v w x y z " ¬into field pressAlphabetif the checkMark of menuItem "Difficult Puzzle" of menu "Cryptogram" ¬= true thenput editString("ucase",field pressAlphabet) into field pressAlphabetend ifif charToNum of char 3 of field pressAlphabet = 65 and ¬textFont of field alphabet = "Helvetica" thenset textStyle of field alphabet to plainset textStyle of field pressAlphabet to plainelse if charToNum of char 3 of field pressAlphabet = 97 and ¬textFont of field alphabet = "Helvetica" thenset textStyle of field alphabet to extendset textStyle of field pressAlphabet to extendelse if charToNum of char 3 of field pressAlphabet = 65 and ¬textFont of field alphabet = "Monaco" thenset textStyle of field alphabet to plainset textStyle of field pressAlphabet to plainelse if charToNum of char 3 of field pressAlphabet = 97 and ¬textFont of field alphabet = "Monaco" thenset textStyle of field alphabet to plainset textStyle of field pressAlphabet to plainend if-- unlock screen with dissolve very fastend toggleDifficultPuzzleon initializeFields-- set the rect of cd field update to 25,114,480,188put empty into cd field updateshow cd field updatelock Screenset itemDelimiter to ","put "record,alphabet,clue,myPuzzle,cryptoPuzzle,letter1,letter2,puzzle,key"¬into fieldNamesrepeat with x = 1 to the number of items of fieldNamesput empty into field (item x of fieldNames)end repeatunlock Screen with dissolve very fastput 0 into line 1 of field recordhide msgmsgPlacementend initializeFieldson msgPlacementif the screenRect = "0,0,512,342" then set loc of msg to 21,287elseset loc of msg to 20,359end ifend msgPlacementon idlescrambleSayingspass idleend idleon scrambleSayingsglobal scrambleTimerif scrambleTimer = "stop" or scrambleTimer = empty then exit scrambleSayingsif the seconds > (scrambleTimer + (60 * 15)) thenput trunc(the number of lines of field sayings * .50) into counterput field sayings into sayingsTemprepeat counter timesput the random of (the number of lines of sayingsTemp) into lineNo1put the random of (the number of lines of sayingsTemp) into lineNo2put line lineNo1 of sayingsTemp into puzzle1put line lineNo2 of sayingsTemp into puzzle2put puzzle1 into line lineNo2 of sayingsTempput puzzle2 into line lineNo1 of sayingsTempend repeatput sayingsTemp into field sayingsrenumberSayingsput the seconds into scrambleTimerend ifend scrambleSayings</script>